package com.tianzheng.rzzl.base

import com.jeremyliao.liveeventbus.LiveEventBus


/**
 * @author yj
 * @description
 */
object ConstantApp {
    const val mapZoom = 14f

    const val INTENT_KEY1 = "消息/通知"

    //livedata key
    const val LiveKey1 = "消息/通知"
    const val LiveKey2 = "工单"
    const val LiveKey3 = "派单信息更新"
    const val LiveKey4 = "工单执行更新"
    const val LiveKey5 = "工单执行-保养安装"
    const val LiveKey6 = "新增故障"
    const val LiveKey7 = "新增工单"
    const val LiveKey8 = "品牌型号选择"
    const val LiveKey9 = "完成工单评分"
    const val LiveKey10 = "完成签到"
    const val LiveKey11 = "学习视频库搜索"
    const val LiveKey_Map = "地图选点返回"
    
    fun eventPost(key: String, value: Any = "") {
        LiveEventBus.get(key).post(value)
    }

    fun eventPost1(value: Any? = "") {
        LiveEventBus.get(LiveKey1).post(value)
    }

    fun eventPost2(value: Any? = "") {
        LiveEventBus.get(LiveKey2).post(value)
    }

    fun eventPost3(value: Any? = "") {
        LiveEventBus.get(LiveKey3).post(value)
    }

    fun eventPost4(value: Any? = "") {
        LiveEventBus.get(LiveKey4).post(value)
    }

    fun eventPost5(value: Any? = "") {
        LiveEventBus.get(LiveKey5).post(value)
    }

    fun eventPost6(value: Any? = "") {
        LiveEventBus.get(LiveKey6).post(value)
    }

    fun eventPost7(value: Any? = "") {
        LiveEventBus.get(LiveKey7).post(value)
    }

    fun eventPost8(value: Any? = "") {
        LiveEventBus.get(LiveKey8).post(value)
    }

    fun eventPost9(value: Any? = "") {
        LiveEventBus.get(LiveKey9).post(value)
    }

    fun eventPost10(value: Any? = "") {
        LiveEventBus.get(LiveKey10).post(value)
    }
    
}

fun getPinJie(str1: String?, str2: String?): String {
    return "${str1 ?: ""}${if (!str1.isNullOrEmpty() && !str2.isNullOrEmpty()) "/" else ""}${str2 ?: ""}"
}